<?php
       function connectSql(){
		   $host="localhost";
		   $user="root";
		   $password="";
		   $database="wq";
		   $port="3306";
       	   $link = mysqli_connect($host, $user, $password, $database, $port);
		   if(!$link){
		   	    echo "数据库连接失败";
		   }
		   mysqli_query($link, "set names utf8");
		   return $link;
       }
	 
?>